//
//  Test34.cpp
//  CPPTest
//
//  Created by you5 Yi on 2021/9/25.
//

#include "Test34.hpp"
#include <iostream>
using namespace std;
class base2 {
public:
    virtual void print() {
        cout<<"In base"<<endl;
    }
};
class derived: public base2 {
public:
    void print() {
        cout<<"In derived"<<endl;
    }
};
void show(base2 *pb,void (base2::*pf)()) {
    (pb->*pf)();
}

void test34() {
    base2 b;
    derived d;

//    show(&b,base2::print());
//    show(&d,base2::print());
}
